import VueCookies from "vue-cookies";
import Vue from "vue";

Vue.use(VueCookies);
//设置cookie时间
var EXPIRE_TIME = new Date();

function setCookie(cNAme, value, days) {
  EXPIRE_TIME.setTime(EXPIRE_TIME.getTime + 24 * 60 * 60 * 1000 * days);

  console.log("cookie 设置的时间" + EXPIRE_TIME);
  VueCookies.setCookie(cNAme,value,days)

}
function getCookie(name){
  console.log("根据名字获取cookie")  
    return  VueCookies.getCookie(name)
}
function removeCookie(name){
   return VueCookies.removeCookie(name)
}
function isKey(name){
    return VueCookies.isKey(name)
}
function cookies(){
    return VueCookies.VueCookies()
}
export default{
    setCookie,
    getCookie,
    removeCookie,
    isKey,
    cookies,
}